# -*- coding:utf-8 -*-

__author__ = 'chendaqing'

import os

_basedir = os.path.abspath(os.path.dirname(__file__))


"""
网站的配置文件
"""

from mark import views

class DefaultConfig(object):
	"""
		Default configuration for a newsmeme application.
		默认的配置信息，用类来表示，而不是配置文件
	"""

	DEBUG = True

	MAIL_SERVER = 'smtp.gmail.com'
	MAIL_PORT=465
	MAIL_USE_TLS=False
	MAIL_USE_SSL=True
	MAIL_DEBUG=DEBUG
	MAIL_USERNAME = 'daqing15@gmail.com'
	MAIL_PASSWORD = 'daqiing1221'
	DEFAULT_MAIL_SENDER = 'daqing15@gmail.com'

	# change this in your production settings !!!
	SECRET_KEY = "secret"

	# keys for localhost. Change as appropriate.
	RECAPTCHA_PUBLIC_KEY = '6LeYIbsSAAAAACRPIllxA7wvXjIE411PfdB2gt2J'
	RECAPTCHA_PRIVATE_KEY = '6LeYIbsSAAAAAJezaIq3Ft_hSTo0YtyeFG-JgRtu'

	DATABASE_URI = 'sqlite:///' + os.path.join(_basedir, 'qqaiai.db')
	#SQLALCHEMY_DATABASE_URI = "sqlite:///qqaiai.db"

	THREADS_PER_PAGE = 15

	SQLALCHEMY_ECHO = False

	MAIL_DEBUG = DEBUG

	ADMINS = frozenset(['http://manager.scelong.com/'])

	DEFAULT_MAIL_SENDER = "daqing15@gmail.com"

	ACCEPT_LANGUAGES = ['en', 'zh']

	DEBUG_LOG = 'logs/debug.log'
	ERROR_LOG = 'logs/error.log'

	THEME = 'qqaiai'

	CACHE_TYPE = "simple"
	CACHE_DEFAULT_TIMEOUT = 300

	UPLOAD_FOLDER = os.path.join(_basedir, 'upload')
	ALLOWED_EXTENSIONS = set(['png', 'jpg', 'jpeg', 'gif'])
	MAX_CONTENT_LENGTH = 16 * 1024 * 1024



if __name__ == "__main__":
	print DefaultConfig.UPLOAD_FOLDER, DefaultConfig.ALLOWED_EXTENSIONS

del os